<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\Floor
 *
 * @property int $id
 * @property string $title 标题
 * @property string $introduce 介绍
 * @property string $image 展示图片
 * @property string $url 展示图片的url
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Floor newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Floor newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Floor query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Floor whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Floor whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Floor whereImage($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Floor whereIntroduce($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Floor whereTitle($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Floor whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Floor whereUrl($value)
 * @mixin \Eloquent
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Product[] $item
 * @property-read int|null $item_count
 */
class Floor extends Model
{
    //

    protected $fillable=[];

    /**
     * 楼层中的内容
     */
    public function item() {
        return $this->belongsToMany(Product::class,'product_and_floor');
    }
}
